Repository navigation
Renderer check: rounded edges drawn over what fills their corners (pk-frame) - #189
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved frame-detection issues can miss unprotected corner fills or report false positives because radius fitting, paint transparency, overlay stacking, and iframe content are handled incorrectly.
5 open issues
What changed in this PR
Extends the rounded-frame work from #185 with a structural renderer check for built-in and custom renderers, and makes the kit’s frame styling reusable beyond Group.
Changes:
- Adds
frame-edgeschecks in light and dark modes. - Introduces reusable
pk-framestyling and applies it to gallery stages. - Adds reporting and browser regression tests, plus documentation.
| File | Description |
|---|---|
packages/renderers/testing/test/helpers.test.mjs |
Tests check results and grouped reporting. |
packages/renderers/testing/src/types.ts |
Adds frame measurement and check types. |
packages/renderers/testing/src/probe.ts |
Registers the frame measurement call. |
packages/renderers/testing/src/measure/frames/overlays.ts |
Detects pseudo-element overlays at corners. |
packages/renderers/testing/src/measure/frames.ts |
Detects fills covering rounded edges. |
packages/renderers/testing/src/measure.ts |
Exports the frame measurement. |
packages/renderers/testing/src/checks/runner.ts |
Registers the new check implementation. |
packages/renderers/testing/src/checks/edges.ts |
Runs frame checks across both color modes. |
packages/renderers/testing/src/checks/catalog.ts |
Adds the check’s title and description. |
packages/renderers/testing/README.md |
Documents the frame-edge contract. |
packages/renderers/kit/styles/layout.css |
Shares frame styling between Group and pk-frame. |
packages/renderers/harness/browser/frames.spec.ts |
Adds a gallery-stage probe regression test. |
packages/renderers/gallery/src/styles.css |
Uses the shared frame radius and clipping. |
packages/renderers/gallery/src/stage.tsx |
Applies pk-frame to gallery stages. |
docs/guides/develop-a-renderer.md |
Adds rounded-edge guidance for renderer authors. |
Review effort: Balanced
…-frame) pixels for built-in renderers. This makes it a renderer check every renderer meets, custom ones included, and a class any container can take. - frame-edges (renderer check, probe call `frames`): a box with rounded corners and a visible edge (a border, or an outline inside it) whose painted contents reach a corner must draw its edge over them. That is a pseudo-element overlay on its box (the kit's frame) or on an ancestor sharing that corner (a data table's frame), an outline its contents sit under, or a fill that is the edge there itself (a data table's rows). Renderer checks can't read pixels, so the rule is structural; the harness frames spec still measures the pixels. - `pk-frame`: the kit's frame, for any bordered, rounded container; Group is one. Its radius is `--pk-frame-radius`. - Gallery's scenario stage, the one violation the check finds: its note and nested drawing filled it over its border. It is a `pk-frame` now. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
`projections check` of self-authoring-sdk (1894 entities) found the new frame-edges violation: past 500 declarations the panel's notice fills its top corners over its border. The panel is a `pk-frame` now, and a synthetic large-surface scenario (600 declarations) shows the notice, so the harness sweep covers it. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…g there Since #185 a kit frame (Group, pk-frame) draws its edge in its ::after with a rule that outweighs a renderer's own there, so a badge or label drawn in it silently never shows, or moves the edge. frame-edges now reads the stylesheets too: a rule whose ::after lands on a kit frame may recolor the edge (border color, opacity, custom properties), and anything else fails. The renderer kit guide, develop-a-renderer and the kit's CSS say so. No built-in renderer draws there. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
agorischek
force-pushed
the
agorischek/frame-check
branch
from
November 22, 2026 21:33
1e1ba66 to
5924fd9
Compare
…itted radii, nested frames and overlay stacking Review follow-ups: - Transparency is read with colorAlpha, so color(srgb 0 0 0 / 0) is clear. - An inset shadow exempts a fill only where it draws a sharp, visible edge along that corner's side (offset toward it, or spread), not any inset shadow. - Corner radii are resolved and fitted as CSS draws them (percentages, ellipses, a pill's 9999px), shared with the ring measure (fittedRadii). - Replaced content (a nested renderer's iframe, an image) is a fill. - An overlay draws the edge only when visible (opacity, border color) and stacked after the fill: a higher z-index, or the same as an ::after. A harness test builds each case. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
agorischek
added a commit
that referenced
this pull request
Nov 22, 2026
…s what CI's would (#191) With --fast or --affected, the format gate checked only changed files whose extension matched a list that left out Markdown, so a misformatted guide passed locally and failed CI's `oxfmt --check` (#189). It now runs `npm run format:check`, CI's own command, in every mode: the whole tree takes under a second, and a scoped list can only drift from what CI checks. A test asserts the gate plans that command for a Markdown or .mjs change, scoped or not. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This is step (b) of the polish plan. #185's frame rule becomes a renderer check that every renderer meets, custom ones included, and a class any container can opt into.
The check:
frame-edgesA box with rounded corners and a visible edge (a border, or an outline inside it) whose painted contents reach a corner must draw its edge over them, in one of four ways:
The rule is structural because renderer checks run in-page and can't read pixels. The harness's
framesspec (#185) still measures the pixels for built-in renderers.pk-frameThe kit's frame now works for any bordered, rounded container;
Groupis one user of it. It draws its border again over its contents, gives way to rings, clips to its outer edge, and takes its radius from--pk-frame-radius. The rules moved from.pk-groupto.pk :is(.pk-group, .pk-frame).A real violation, fixed
Gallery's scenario stage is a rounded, bordered box whose note and nested drawing fill it to its edge, over its border. Run against main's gallery, the check fails on
gallery/fixture-changewithp.gl-stage-note fills a rounded corner of div.gl-stage over its edge. The stage is now apk-frame, and the check passes on all 77 scenarios.Database cards pass: their changed rows draw their own edge at the card's curve, by design. Their WebKit-only thinning from the card's clip (0.91 of the sides, found in #185) is a pixel-level issue this structural rule doesn't express, and stays a follow-up.
Tests
frames.spec, the probe finds the gallery stage restored to main's construction (its own border, clipping its contents) and finds nothing once the stage is a kit frame.tools check --fastanddocs:checkpass.Follow-up (1e43cd7):
projections checkof the self-authoring-sdk projection found a second violation. The api renderer's panel notice ("Showing 500 of N declarations") filled the panel's top corners over its border..api-panelis apk-framenow, and a syntheticapi/large-surfacescenario (600 declarations) shows the notice, so the harness sweep covers it (it fails without the fix). All five self-projections passprojections check --trustlocally.